<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./vue.js"></script>
    <script src="./citytest.js"></script>
    <style>
      button {
        margin: 5px;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <ul>
        <li v-for="(cityList,letter) in cityData">
          <h3>{{letter}}</h3>
          <div>
            <button v-for="item in cityList">{{item.name}}</button>
          </div>
        </li>
      </ul>
    </div>
  </body>
  <script>
    let { createApp } = Vue;
    // 创建Vue根实例
    let app = createApp({
      data() {
        // 可以在模板中绑定的数据
        return {
          cityData,
        };
      },
    });
    app = app.mount("#app"); //指定容器
  </script>
</html>
